logo

Notes and Conventions

Notes

  • This is an example R Markdown report to demonstrate the workflow for building a “data memo” or report object in parallel with the conduct of a RsNLME analysis.
  • We use html output and “tabsets” within the RMarkdown document to show how RsNLME can be used together with R markdown to produce very dense, interactive data summaries that capture a large amount of data in well organized, easily shared delivery mechanism.
  • We also show how RsNLME shiny apps generate code specific to your analysis problem that allows you to get the job done, even if you’re not an R expert!

Conventions used in this document

  • We’ve used blue text boxes to indicate descriptive information
  • We’ve used yellow text boxes to indicate results
  • Green text boxes provide key messages from the analysis results
  • Example: This is a key message statement
# Analysis ID     : Project XYZ Population PK Analysis
# Purpose         : Summarize Base PK model
# Other Info      : Define your own!

pkdata <- read.csv("pkdata.csv")

Objectives

The purpose of this data memo is to provide a summary of the base population pharmacokinetic model fit for study XYZ, and to summarize simulated exposure target attainment as measured by Cmax and AUC24 following the first administered dose of study drug.

Study Design

  • 100 healthy and infected male and female subjects were enrolled in this study at 3 centers under inpatient and outpatient settings
  • Subjects were administered 100 mg of Drug XYZ intravenously at time=0 and time=24
  • Blood samples were obtained at 0, 0.25, 0.5, 1, 2, 4, 6, 8, 12, and 24 hours after the first dose, and 12, and 24 hours after the second dose of Drug XYZ
  • Covariates in the dataset include baseline subject weight, age, creatinine clearance, gender, status (healthy or infected) and study center (3 sites), and setting (inpatient or clinic).

Methods

  • Data analysis was conducted using the population pharmacokinetic program RsNLME version 1.1.0 (https://certara.github.io/R-RsNLME/index.html)
  • A two-compartment model with bolus input and first-order elimination from the central compartment was used to model the time course of drug XYZ plasma concentrations. The parameters of this model were clearance (Cl), volume of distribution of the central compartment (V), volume of distribution of the peripheral compartment (V2), and intercompartmental clearance (Cl2)
  • Body weight was included as a covariate on Cl and V based on previous modeling work
  • The base model was used to simulate individual concentration time profiles for 100 replicates of the study design, and AUC24 and Cmax were derived and summarized relative to target exposure thresholds

Overview of the data

Summary

  • Elimination profile appears to be bi-exponential
  • Body weight and gender appear to influence PK



Categorical covariate summary

catcovsumm <- readRDS(file='catcovsumm.RDS')
catcovsumm
Variable Center
AB123456, N = 121 AB567765, N = 501 AB765432, N = 381
SEX
Male 7 (58%) 22 (44%) 17 (45%)
Female 5 (42%) 28 (56%) 21 (55%)
STATUS
HEALTHY 7 (58%) 10 (20%) 13 (34%)
INFECTED 5 (42%) 40 (80%) 25 (66%)
SETTING
Clinic 0 (0%) 50 (100%) 0 (0%)
Inpatient 12 (100%) 0 (0%) 38 (100%)

1 n (%)



Continuous covariate summary

contcovsumm <- readRDS(file='contcovsumm.RDS')
contcovsumm
Variable Center
AB123456, N = 121 AB567765, N = 501 AB765432, N = 381
WT 74 (28) [44-126] 69 (26) [34-121] 74 (28) [34-153]
AGE 58 (25) [31-93] 57 (18) [27-90] 49 (13) [27-90]
CRCL 91 (10) [78-112] 88 (11) [66-112] 91 (11) [71-114]

1 Mean (SD) [Minimum-Maximum]



Mean profiles Linear

meanlinplot <- readRDS(file='meanlinplot.RDS')
meanlinplot



Mean profiles Log

  • bi-exponential disposition
meanlogplot <- readRDS(file='meanlogplot.RDS')
meanlogplot



Facet Gender Linear

  • Gender influence on PK with higher DV’s in females
meanlinplotbysex <- readRDS(file='meanlinplotbysex.RDS')
meanlinplotbysex



Facet WT Linear

  • WT influence on PK with higher DV’s in lower weight subjects
meanlinplotbywt <- readRDS(file='meanlinplotbywt.RDS')
meanlinplotbywt

Base Model Development

Summary

  • A 2 compartment model with IV bolus input was used to fit the data
  • Convergence was achieved with successful estimation of parameter standard errors
  • Model fit diagnostics show acceptable fit



Model Description

  • A 2 compartment model with IV bolus input was used to fit the data
  • Model parameters central clearance (Cl), central volume (V), inter-compartmental clearance (Cl2), and peripheral compartment volume (V2)
  • Body weight covariate on Cl and V (parameters dCldWT and dVdWT, respectively)
  • Between subject variability terms on Cl and V
  • Proportional residual error model

Structural PK Model

## View the updated model 
model<-readRDS("model.RDS")
print(model)
## Loading required package: Certara.RsNLME
## 
##  Model Overview 
##  ------------------------------------------- 
## Is population     :  TRUE
## Model Type        :  PK
## 
##  PK 
##  ------------------------------------------- 
## Parameterization  :  Clearance
## Absorption        :  Intravenous
## Num Compartments  :  2
## Dose Tlag?        :  FALSE
## Elimination Comp ?:  FALSE
## Infusion Allowed ?:  FALSE
## Sequential        :  FALSE
## Freeze PK         :  FALSE
## 
##  PML 
##  ------------------------------------------- 
## test(){
##     cfMicro(A1,Cl/V, Cl2/V, Cl2/V2)
##     dosepoint(A1)
##     C = A1 / V
##     error(CEps=0.2)
##     observe(CObs=C * ( 1 + CEps))
##     stparm(V = tvV * ((WT/70)^dVdWT)   * exp(nV))
##     stparm(Cl = tvCl * ((WT/70)^dCldWT)   * exp(nCl))
##     stparm(V2 = tvV2)
##     stparm(Cl2 = tvCl2)
##     fcovariate(WT)
##     fcovariate(AGE)
##     fcovariate(CRCL)
##     fcovariate(SEX())
##     fixef( tvV = c(,80,))
##     fixef( tvCl = c(,6,))
##     fixef( tvV2 = c(,100,))
##     fixef( tvCl2 = c(,9,))
##     fixef( dVdWT(enable=c(0)) = c(,0,))
##     fixef( dCldWT(enable=c(1)) = c(,0,))
##     ranef(diag(nV,nCl) = c(0.1,0.1))
## }
## 
##  Structural Parameters 
##  ------------------------------------------- 
##  V Cl V2 Cl2
##  ------------------------------------------- 
## Observations:
## Observation Name :  CObs
## Effect Name      :  C
## Epsilon Name     :  CEps
## Epsilon Type     :  Multiplicative
## Epsilon frozen   :  FALSE
## is BQL           :  FALSE
##  ------------------------------------------- 
##  Column Mappings 
##  ------------------------------------------- 
## Model Variable Name : Data Column name
## id                  : ID
## time                : TIME
## A1                  : AMT
## WT                  : WT
## AGE                 : AGE
## CRCL                : CRCL
## SEX                 : SEX( male=0 female=1 )
## CObs                : DV

GOF Plots

DV vs PRED

dvpred <- readRDS("dvpred.RDS")
dvpred

DV vs iPRED

dvipred <- readRDS("dvipred.RDS")
dvipred

CWRES vs TIME

cwresidv <- readRDS("cwresidv.RDS")
cwresidv
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'

CWRES vs PRED

cwrespred <- readRDS("cwrespred.RDS")
cwrespred
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'

ETA vs WT

etacovcont <- readRDS("etacovcont.RDS")
## Registered S3 method overwritten by 'GGally':
##   method from   
##   +.gg   ggplot2
etacovcont
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'

ETA vs SEX

etacovcat <- readRDS("etacovcat.RDS")
etacovcat

Parameter Estimates

Overall Run Summary

tableoverall <- readRDS("tableoverall.RDS")
tableoverall

Thetas

tabletheta <- readRDS("tabletheta.RDS")
tabletheta

Omegas

tableomega <- readRDS("tableomega.RDS")
tableomega

Sigmas

tablesigma <- readRDS("tablesigma.RDS")
tablesigma

Visual Predictive Check

vpcPlot <- readRDS("vpcPlot.RDS")
vpcPlot

Target Attainment Simulation

Summary

  For 100 mg q24h * 7 dose regimen, Cmax and AUC24 on day 7:

  • 97% target achievement for AUC24 Overall; 69% for WT > 115 Kg
  • 92% target achievement for Cmax Overall; 45% for WT > 115 Kg
  • Consider WT based dose adjustment to maintain target exposures

Plots

Overall

TAplot <- readRDS("TAplot.RDS")
TAplot

Target Attainment by WT Cuts

TAplotbyWT <- readRDS("TAplotbyWT.RDS")
TAplotbyWT

Session Info

sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] Certara.RsNLME_1.1.0 flextable_0.6.8     

loaded via a namespace (and not attached):
 [1] sass_0.4.0               tidyr_1.2.0              jsonlite_1.7.3          
 [4] splines_4.1.1            bslib_0.3.1              shiny_1.7.1             
 [7] assertthat_0.2.1         highr_0.9                yaml_2.2.2              
[10] gdtools_0.2.3            shinymaterial_1.2.0      pillar_1.7.0            
[13] backports_1.4.1          lattice_0.20-44          glue_1.6.1              
[16] uuid_0.1-4               digest_0.6.29            RColorBrewer_1.1-2      
[19] promises_1.2.0.1         polyclip_1.10-0          checkmate_2.0.0         
[22] colorspace_2.0-2         plyr_1.8.6               htmltools_0.5.2         
[25] httpuv_1.6.5             Matrix_1.3-4             pkgconfig_2.0.3         
[28] purrr_0.3.4              xtable_1.8-4             scales_1.1.1            
[31] tweenr_1.0.2             later_1.3.0              officer_0.4.0           
[34] ggforce_0.3.3            tibble_3.1.6             mgcv_1.8-36             
[37] generics_0.1.2           farver_2.1.0             ggplot2_3.3.5           
[40] ellipsis_0.3.2           gtsummary_1.5.0          shinyjs_2.1.0           
[43] cli_3.1.1                magrittr_2.0.2           crayon_1.5.0            
[46] mime_0.12                evaluate_0.14            GGally_2.1.2            
[49] fansi_1.0.2              broom.helpers_1.5.0      nlme_3.1-152            
[52] MASS_7.3-54              xml2_1.3.3               tools_4.1.1             
[55] data.table_1.14.2        lifecycle_1.0.1          stringr_1.4.0           
[58] munsell_0.5.0            zip_2.2.0                Certara.NLME8_1.2.0     
[61] compiler_4.1.1           jquerylib_0.1.4          xpose_0.4.13            
[64] systemfonts_1.0.2        rlang_1.0.0              grid_4.1.1              
[67] gt_0.3.1                 rstudioapi_0.13          base64enc_0.1-3         
[70] labeling_0.4.2           rmarkdown_2.11           egg_0.4.5               
[73] gtable_0.3.0             reshape_0.8.8            DBI_1.1.1               
[76] R6_2.5.1                 gridExtra_2.3            knitr_1.37              
[79] dplyr_1.0.7              fastmap_1.1.0.9000       utf8_1.2.2              
[82] commonmark_1.7           Certara.Xpose.NLME_1.1.0 stringi_1.7.6           
[85] Rcpp_1.0.8               vctrs_0.3.8              tidyselect_1.1.1        
[88] xfun_0.29